from numpy import *

def difference(dataSet):
    max=0
    #print(len(dataSet[0]))
    for k in range(len(dataSet)-1):
        # print max
        if max < (dataSet[k + 1] - dataSet[k]):
            max = dataSet[k+1]-dataSet[k]
            key = k + 1
            # print max
            #print key,dataSet[0][k]
    # x = [[] for i in range(len(dataSet))]
    # print key
    x=[[] for i in range(len(dataSet))]
    for i in range(len(dataSet)):
        if i<key:
            x[i].append(0)
            x[i].append(0)
        else:
            x[i].append(1)
            x[i].append(1)
    return matrix(x)

if __name__=='__main__':
    A=[0.7585763931274414, 0.8314967155456543, 0.8880138397216797, 0.8885025978088379, 0.9186863899230957, 1.6231417655944824, 1.6403794288635254, 1.6445517539978027, 1.80739164352417, 1.8272995948791504, 1.8358826637268066, 1.9417881965637207]
    B=difference(A)
    print B
    print int(B[:,0][0])
